package com.me.dao.imp;

import org.springframework.jdbc.core.JdbcTemplate;

import com.me.dao.UserLogDao;
import com.me.entity.UserLog;

public class UserLogDaoImp implements UserLogDao{
	 private JdbcTemplate jdbcTemplate;
	 public void insertLog(UserLog userLog){
		 String sqlStr = "insert into userLog(userId,loginDate,ip) values(?,?,?)";
		 jdbcTemplate.update(sqlStr,new Object[]{userLog.getUserId(),userLog.getLoginDate(),userLog.getIp()});
	 }
	public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
		this.jdbcTemplate = jdbcTemplate;
	}
}
